package com.sikaryofficial.workbench.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sikaryofficial.workbench.domain.dto.req.goods.GoodsFilterReq;
import com.sikaryofficial.workbench.domain.dto.req.goods.GoodsListReq;
import com.sikaryofficial.workbench.domain.dto.resp.goods.GoodsDTO;
import com.sikaryofficial.workbench.domain.dto.resp.goods.GoodsFilterDTO;
import com.sikaryofficial.workbench.domain.entity.Goods;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品Mapper接口
 * 
 * @author wuweihong
 * @date 2024-09-23
 */
public interface GoodsMapper extends BaseMapper<Goods>
{
    IPage<GoodsDTO> getGoodsByPage(Page<GoodsDTO> customerPage, @Param("req") GoodsListReq req);

    GoodsFilterDTO queryGoodsFilter(@Param("req") GoodsFilterReq req ,@Param("userId") Long userId);

    Boolean updateRecommendGoods(@Param("goodsIds") List<Long> goodsIds);

    List<Goods> navigation(@Param("userId") Long userId);
}
